<?php

	$Action = $_GET["action"]; 
	$Password_Input = $_POST["password_input_form"]; 
	//
	Session_Start();
	//
	Require_Once("config.php"); 
	//
	if(!$Password_Input)
	{
		$_SESSION["login"] = "password_none";
		Header("Location:$URL");
	}
	elseif($Password_Input != $Password)
	{
		$_SESSION["login"] = "password_error";
		Header("Location:$URL");
	}
	elseif($Password_Input == $Password)
	{
		$_SESSION["login"] = "logged";
		Header("Location:$URL" . "editor.php");
	}
	//
	if($Action == "logout")
	{
		$_SESSION["login"] = "logout";
		Header("Location:$URL");
	}	
?>